package com.share.user.api.model;

import com.share.common.core.constant.ServiceNameConstants;
import com.share.common.core.domain.R;
import com.share.common.core.domain.Users;
import com.share.system.api.model.LoginUser;
import com.share.user.api.domain.UpdateUserLogin;
import com.share.user.api.domain.UserInfo;
import com.share.user.api.domain.UserLogin;
import com.share.user.api.factory.RemoteShareUserServiceFallbackFactory;
import io.swagger.v3.oas.annotations.Operation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

@FeignClient(contextId = "remoteUsersService",
        value = ServiceNameConstants.USERS_SERVICE,
        fallbackFactory = RemoteShareUserServiceFallbackFactory.class)
public interface RemoteShareUserService {
    @GetMapping("/userInfo/wxLogin/{code}")
    R<UserInfo> getUsers(@PathVariable("code") String code);


    @PutMapping("/userInfo/updateUserLogin")
    public R<Users> updateUserLogin(@RequestBody UserLogin userLogin);
}
